package com.service.atm;

import com.bpms.common.CommonUtil;
import com.bpms.common.VO;
import com.bpms.eai.PackTool;
import com.bpms.esb.IService;

public class Parse_atm_account extends PackTool implements IService {

	public VO exec(VO args) {
		byte[] body=(byte[])args.getObj("body");
		VO r=new VO();
		try{
			r.voType="ATM.Answer_atm_account";
			String DEVICENO=this.getField(body, body.length, "1001");  //设备号                     
			String NETNUM=this.getField(body, body.length, "1002");   //网点号               
			String BillDateTime=this.getField(body, body.length, "1003");    //日期时间                       
			String ACCOUNTTYPE=this.getField(body, body.length, "1004");    //账号类型	1：ID卡 2：磁条卡  3：身份证                                         
			String CARDID=this.getField(body, body.length, "1005");    //账号	ID卡号或磁条卡号或身份证号        
			String PASSWORD=this.getField(body, body.length, "1006");    //1006 密码
					
			
			r.setAttr("DEVICENO",DEVICENO);
			r.setAttr("NETNUM",NETNUM);
			r.setAttr("BillDateTime",BillDateTime);
			r.setAttr("ACCOUNTTYPE",ACCOUNTTYPE);
			r.setAttr("CARDID",CARDID);
			r.setAttr("PASSWORD",PASSWORD);
			
			CommonUtil.debug("ATM.Parse_atm_account parseBuffer");
			return r;
		}
		catch(Exception e)
		{
			CommonUtil.debug("ATM.Parse_atm_account exception",e);
			return null;
		}
		
	}

}
